package cn.com.vrv.service.mysql;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.com.vrv.domain.mysql.SysUser;
import cn.com.vrv.repository.mysql.SysUserRepository;

/**
 * SysUserService 实际中需要些 分为 domain-> dao(JPA) -> service -> controller
 * 
 * @author 赵炎
 * @version [V1.00, 2018年3月1日]
 * @see [相关类/方法]
 * @since V1.00
 */
@Service
public class SysUserService
{
    @Autowired
    private SysUserRepository sysUserRepository;
    
    /**
     * <一句话功能简述>
     * <功能详细描述>
     * 
     * @return
     * @see [类、类#方法、类#成员]
     */
    public List<SysUser> findAll()
    {
        return this.sysUserRepository.findAll();
    }
    
    /**
     * <一句话功能简述>
     * <功能详细描述>
     * 
     * @param sysUser
     * @see [类、类#方法、类#成员]
     */
    @Transactional
    public void saveSysUser(SysUser sysUser)
    {
        this.sysUserRepository.saveAndFlush(sysUser);
    }
    
}
